package com.teangtang.fly.service;

import com.teangtang.fly.entity.Cabin;
import com.teangtang.fly.repository.CabinRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class CabinService {
    @Autowired
    private CabinRepository cabinRepository;

    public Cabin getCabinById(Long id) {
        return cabinRepository.findById(id).orElse(null);
    }
}
